package com.ereach;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

public class MainLinkedList {
    public static void main(String[] args) {
        List<String> list1 = new LinkedList<>();

        Collections.addAll(list1, "a", "b", "c");
        System.out.println(list1);

        list1.remove(1);
        System.out.println(list1);

        LinkedList<String> list2 = new LinkedList<>(list1);
        list2.push("d");
        list2.push("e");
        System.out.println(list2);

        System.out.println(list2.pop());

        System.out.println(list2.remove());
        System.out.println(list2.contains("a"));
    }
}
